import axios from 'utils/axios.js'

// 用户登录
export function userLogin (form) {
  return axios.post(`/user/login`, form)
}
// 用户注册接口
export function userRegister (form) {
  return axios.post(`/user/register`, form)
}
export function userForgot (form) {
  return axios.post(`/user/forgot`, form)
}
// 获取用户详细信息接口
export function getUserInfo () {
  return axios.get('/user/info')
}
export function getUserList (data, query) {
  return axios.post(`/user/list?page=${query.page}&limit=${query.limit}`, data)
}
export function getUserDetail (id) {
  return axios.get(`/user/${id}`)
}
export function addUser (data) {
  return axios.post(`/user`, data)
}
export function delUser (id) {
  return axios.delete(`/user/${id}`)
}
export function updateUser(data) {
  return axios.put(`/user/`, data)
}
